/*
 Navicat Premium Data Transfer

 Source Server         : localDB
 Source Server Type    : MySQL
 Source Server Version : 50615
 Source Host           : 127.0.0.1
 Source Database       : yii2

 Target Server Type    : MySQL
 Target Server Version : 50615
 File Encoding         : utf-8

 Date: 01/30/2015 14:24:42 PM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `auth_assignment`
-- ----------------------------
DROP TABLE IF EXISTS `auth_assignment`;
CREATE TABLE `auth_assignment` (
  `item_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) DEFAULT NULL,
  PRIMARY KEY (`item_name`,`user_id`),
  CONSTRAINT `auth_assignment_ibfk_1` FOREIGN KEY (`item_name`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `auth_assignment`
-- ----------------------------
BEGIN;
INSERT INTO `auth_assignment` VALUES ('SuperUser', '1', '1415810233');
COMMIT;

-- ----------------------------
--  Table structure for `auth_item`
-- ----------------------------
DROP TABLE IF EXISTS `auth_item`;
CREATE TABLE `auth_item` (
  `name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `type` int(11) NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `rule_name` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  `data` text COLLATE utf8_unicode_ci,
  `created_at` int(11) DEFAULT NULL,
  `updated_at` int(11) DEFAULT NULL,
  PRIMARY KEY (`name`),
  KEY `rule_name` (`rule_name`),
  KEY `idx-auth_item-type` (`type`),
  CONSTRAINT `auth_item_ibfk_1` FOREIGN KEY (`rule_name`) REFERENCES `auth_rule` (`name`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `auth_item`
-- ----------------------------
BEGIN;
INSERT INTO `auth_item` VALUES ('/*', '2', null, null, null, '1415810122', '1415810122'), ('/admin/*', '2', null, null, null, '1415810122', '1415810122'), ('/admin/default/*', '2', null, null, null, '1415810122', '1415810122'), ('/admin/default/index', '2', null, null, null, '1415810122', '1415810122'), ('/admin/user/*', '2', null, null, null, '1415811280', '1415811280'), ('/admin/user/create', '2', null, null, null, '1415811280', '1415811280'), ('/admin/user/delete', '2', null, null, null, '1415811280', '1415811280'), ('/admin/user/index', '2', null, null, null, '1415811280', '1415811280'), ('/admin/user/update', '2', null, null, null, '1415811280', '1415811280'), ('/admin/user/view', '2', null, null, null, '1415811280', '1415811280'), ('/debug/*', '2', null, null, null, '1415810122', '1415810122'), ('/debug/default/*', '2', null, null, null, '1415810122', '1415810122'), ('/debug/default/download-mail', '2', null, null, null, '1415810122', '1415810122'), ('/debug/default/index', '2', null, null, null, '1415810122', '1415810122'), ('/debug/default/toolbar', '2', null, null, null, '1415810122', '1415810122'), ('/debug/default/view', '2', null, null, null, '1415810122', '1415810122'), ('/fileuploads/*', '2', null, null, null, '1418369100', '1418369100'), ('/fileuploads/default/*', '2', null, null, null, '1418369100', '1418369100'), ('/fileuploads/default/index', '2', null, null, null, '1418369100', '1418369100'), ('/fileuploads/upload/*', '2', null, null, null, '1418369100', '1418369100'), ('/fileuploads/upload/index', '2', null, null, null, '1418369100', '1418369100'), ('/gii/*', '2', null, null, null, '1415810122', '1415810122'), ('/gii/default/*', '2', null, null, null, '1415810122', '1415810122'), ('/gii/default/action', '2', null, null, null, '1415810122', '1415810122'), ('/gii/default/diff', '2', null, null, null, '1415810122', '1415810122'), ('/gii/default/index', '2', null, null, null, '1415810122', '1415810122'), ('/gii/default/preview', '2', null, null, null, '1415810122', '1415810122'), ('/gii/default/view', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/*', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/assignment/*', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/assignment/assign', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/assignment/index', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/assignment/role-search', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/assignment/view', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/default/*', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/default/index', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/menu/*', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/menu/create', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/menu/delete', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/menu/index', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/menu/update', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/menu/view', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/permission/*', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/permission/assign', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/permission/create', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/permission/delete', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/permission/index', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/permission/role-search', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/permission/update', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/permission/view', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/role/*', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/role/assign', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/role/create', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/role/delete', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/role/index', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/role/role-search', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/role/update', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/role/view', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/route/*', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/route/assign', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/route/create', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/route/index', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/route/route-search', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/rule/*', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/rule/create', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/rule/delete', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/rule/index', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/rule/update', '2', null, null, null, '1415810122', '1415810122'), ('/rbac/rule/view', '2', null, null, null, '1415810122', '1415810122'), ('/samples/*', '2', null, null, null, '1415947634', '1415947634'), ('/samples/default/*', '2', null, null, null, '1415947634', '1415947634'), ('/samples/default/boxes', '2', null, null, null, '1416219602', '1416219602'), ('/samples/default/buttons', '2', null, null, null, '1417174291', '1417174291'), ('/samples/default/charts', '2', null, null, null, '1416305063', '1416305063'), ('/samples/default/editor', '2', null, null, null, '1418712033', '1418712033'), ('/samples/default/icons', '2', null, null, null, '1417176070', '1417176070'), ('/samples/default/index', '2', null, null, null, '1415947634', '1415947634'), ('/samples/default/jcrop', '2', null, null, null, '1422250809', '1422250809'), ('/samples/default/message', '2', null, null, null, '1417172390', '1417172390'), ('/site/*', '2', null, null, null, '1415810122', '1415810122'), ('/site/about', '2', null, null, null, '1415810122', '1415810122'), ('/site/captcha', '2', null, null, null, '1415810122', '1415810122'), ('/site/contact', '2', null, null, null, '1415810122', '1415810122'), ('/site/error', '2', null, null, null, '1415810122', '1415810122'), ('/site/index', '2', null, null, null, '1415810122', '1415810122'), ('/site/login', '2', null, null, null, '1415810122', '1415810122'), ('/site/logout', '2', null, null, null, '1415810122', '1415810122'), ('SuperUser', '1', '超级管理员', null, null, '1415810052', '1415810052');
COMMIT;

-- ----------------------------
--  Table structure for `auth_item_child`
-- ----------------------------
DROP TABLE IF EXISTS `auth_item_child`;
CREATE TABLE `auth_item_child` (
  `parent` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `child` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`parent`,`child`),
  KEY `child` (`child`),
  CONSTRAINT `auth_item_child_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `auth_item_child_ibfk_2` FOREIGN KEY (`child`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `auth_item_child`
-- ----------------------------
BEGIN;
INSERT INTO `auth_item_child` VALUES ('SuperUser', '/*');
COMMIT;

-- ----------------------------
--  Table structure for `auth_rule`
-- ----------------------------
DROP TABLE IF EXISTS `auth_rule`;
CREATE TABLE `auth_rule` (
  `name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `data` text COLLATE utf8_unicode_ci,
  `created_at` int(11) DEFAULT NULL,
  `updated_at` int(11) DEFAULT NULL,
  PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Table structure for `menu`
-- ----------------------------
DROP TABLE IF EXISTS `menu`;
CREATE TABLE `menu` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(128) NOT NULL,
  `parent` int(11) DEFAULT NULL,
  `route` varchar(256) DEFAULT NULL,
  `order` int(11) DEFAULT NULL,
  `data` text,
  `icon` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `parent` (`parent`),
  CONSTRAINT `menu_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `menu` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `menu`
-- ----------------------------
BEGIN;
INSERT INTO `menu` VALUES ('16', '首页', null, '/admin/default/index', '1', '', 'fa fa-home fa-fw'), ('17', '系统设置', null, null, '2', null, 'fa fa-cogs fa-fw'), ('18', '权限管理', '17', null, '3', null, null), ('19', '用户管理', '17', '/admin/user/index', '1', null, null), ('20', '用户权限', '18', '/rbac/assignment/index', '1', null, null), ('21', '角色管理', '18', '/rbac/role/index', '2', null, null), ('22', '路径管理', '18', '/rbac/route/index', '3', null, null), ('23', '菜单管理', '17', '/rbac/menu/index', '2', null, null), ('24', '规则管理', '18', '/rbac/rule/index', '3', null, null), ('25', '许可管理', '18', '/rbac/permission/index', '4', null, null), ('26', '框架示例', null, '/samples/default/index', '3', null, 'fa fa-puzzle-piece fa-fw'), ('27', 'box示例', '26', '/samples/default/boxes', '1', null, null), ('28', 'charts示例', '26', '/samples/default/charts', '2', null, null), ('29', 'messages控件', '26', '/samples/default/message', '3', null, null), ('30', 'Buttons示例', '26', '/samples/default/buttons', '4', null, null), ('31', 'icons 示例', '26', '/samples/default/icons', '5', null, null), ('32', '文件上传', '26', '/fileuploads/default/index', '6', null, null), ('33', 'editor编辑器', '26', '/samples/default/editor', '8', null, null), ('34', '图片剪切', '26', '/samples/default/jcrop', '7', null, null);
COMMIT;

-- ----------------------------
--  Table structure for `uploads`
-- ----------------------------
DROP TABLE IF EXISTS `uploads`;
CREATE TABLE `uploads` (
  `sign` char(32) NOT NULL,
  `path` varchar(255) DEFAULT NULL,
  `url` varchar(255) DEFAULT NULL,
  `ext` char(3) DEFAULT NULL,
  `addtime` int(11) DEFAULT NULL,
  `uptime` int(11) DEFAULT NULL,
  `weight` int(11) DEFAULT NULL,
  PRIMARY KEY (`sign`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `uploads`
-- ----------------------------
BEGIN;
INSERT INTO `uploads` VALUES ('03e0f7ab31b474da93e2fbb4f5fd7fa4', '/usr/local/var/www/frameyii2/web/uploads/images/20150130/1_1', '/uploads/images/20150130/1_1/03e0f7ab31b474da93e2fbb4f5fd7fa4.jpg', 'jpg', '1422598860', '1422598860', '0'), ('08c9dbf590cf85ff7daf4b504d60c5c6', '/usr/local/var/www/frameyii2/web/uploads/images/20150130/16_9', '/uploads/images/20150130/16_9/08c9dbf590cf85ff7daf4b504d60c5c6.jpg', 'jpg', '1422598846', '1422598846', '0'), ('0c385a0c9fa050bb519aa6e893217813', '/usr/local/var/www/frameyii2/web/uploads/images/20150130/320_320', '/uploads/images/20150130/320_320/0c385a0c9fa050bb519aa6e893217813.jpg', 'jpg', '1422587770', '1422587770', '0'), ('0de914db3685db1bd608c04bfe3792cd', '/usr/local/var/www/frameyii2/web/uploads/images/20150130/320_320', '/uploads/images/20150130/320_320/0de914db3685db1bd608c04bfe3792cd.jpg', 'jpg', '1422587808', '1422587808', '0'), ('43889ffb3c1f24e8b6f82c7a67dbafb0', '/usr/local/var/www/frameyii2/web/uploads/images/20150130/4_3', '/uploads/images/20150130/4_3/43889ffb3c1f24e8b6f82c7a67dbafb0.jpg', 'jpg', '1422598855', '1422598855', '0'), ('46c026f479dc0d01d1c5e9c13b3cc46d', '/usr/local/var/www/frameyii2/web/uploads/images/20150130/4_3', '/uploads/images/20150130/4_3/46c026f479dc0d01d1c5e9c13b3cc46d.jpg', 'jpg', '1422598852', '1422598852', '0'), ('67c55e7454a96c2abf870c7c7a4f9ac8', '/usr/local/var/www/frameyii2/web/uploads/images/20150130/1_1', '/uploads/images/20150130/1_1/67c55e7454a96c2abf870c7c7a4f9ac8.jpg', 'jpg', '1422598864', '1422598864', '0'), ('a679f0ec0d88b6d2e941185ae0ac88b3', '/usr/local/var/www/frameyii2/web/uploads/videos/20150129', '/uploads/videos/20150129/a679f0ec0d88b6d2e941185ae0ac88b3.mp4', 'mp4', '1422539584', '1422539584', '0'), ('aadee21b2f11863679f801897655865c', '/usr/local/var/www/frameyii2/web/uploads/images/20150129/16_9', '/uploads/images/20150129/16_9/aadee21b2f11863679f801897655865c.jpg', 'jpg', '1422540079', '1422540079', '0'), ('af2a0e815535556793c7470bb71fa85f', '/usr/local/var/www/frameyii2/web/uploads/images/20150129/320_320', '/uploads/images/20150129/320_320/af2a0e815535556793c7470bb71fa85f.jpg', 'jpg', '1422540172', '1422540172', '0'), ('b9e74cbc02a167e27b3c018f926955a9', '/usr/local/var/www/frameyii2/web/uploads/videos/20150129', '/uploads/videos/20150129/b9e74cbc02a167e27b3c018f926955a9.mp4', 'mp4', '1422539596', '1422539596', '0'), ('bc841ccd8601797e66a6d701bd40a030', '/usr/local/var/www/frameyii2/web/uploads/images/20150130/16_9', '/uploads/images/20150130/16_9/bc841ccd8601797e66a6d701bd40a030.jpg', 'jpg', '1422598843', '1422598843', '0'), ('c66bba5360bb822d395f7bcd468582bb', '/usr/local/var/www/frameyii2/web/uploads/images/20150130/320_320', '/uploads/images/20150130/320_320/c66bba5360bb822d395f7bcd468582bb.jpg', 'jpg', '1422587765', '1422587765', '0'), ('d5c0a11ff7cb91c553927f0214aae3f0', '/usr/local/var/www/frameyii2/web/uploads/images/20150129', '/uploads/images/20150129/d5c0a11ff7cb91c553927f0214aae3f0.jpg', 'jpg', '1422540188', '1422540188', '0'), ('e03cf8d680b06ae5d7fd9488d112884b', '/usr/local/var/www/frameyii2/web/uploads/images/20150130/320_320', '/uploads/images/20150130/320_320/e03cf8d680b06ae5d7fd9488d112884b.jpg', 'jpg', '1422587701', '1422587701', '0'), ('eb1bbf62e8c5a331c8e1bd88d5632aaf', '/usr/local/var/www/frameyii2/web/uploads/images/20150130/320_320', '/uploads/images/20150130/320_320/eb1bbf62e8c5a331c8e1bd88d5632aaf.jpg', 'jpg', '1422587800', '1422587800', '0');
COMMIT;

-- ----------------------------
--  Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `userid` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(32) DEFAULT NULL,
  `name` varchar(32) DEFAULT NULL,
  `headpic` varchar(255) DEFAULT NULL,
  `infopic` varchar(255) DEFAULT NULL,
  `age` int(11) DEFAULT NULL,
  `gender` smallint(6) DEFAULT NULL,
  `certno` varchar(20) DEFAULT NULL,
  `desc` text,
  `password` char(40) DEFAULT NULL,
  `salt` char(8) DEFAULT NULL,
  `create_timestamp` int(11) DEFAULT NULL,
  `modify_timestamp` int(11) DEFAULT NULL,
  `modify_userid` int(11) DEFAULT NULL,
  PRIMARY KEY (`userid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `user`
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES ('1', 'admin', 'admin', '/uploads/images/20150130/320_320/0de914db3685db1bd608c04bfe3792cd.jpg', '/uploads//images/20150122/cf4b758e14ea04117cb08181990a9d2f.jpg', '13', '1', '', '', 'ba1844aae2f18a0b60c4fa482d58941416d5f721', 'admin001', null, '1422587815', '1');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
